package com.example.demo.constant;

/**
 * @author shipeilei
 * @date 2020-7-16 13:02:08
 * @desc desc
 */
public class Constants {
    /**
     * oauth 缓存前缀
     */
    public static final String OAUTH_ACCESS = "platform:";
    /**
     * header key
     */
    public static final String HEADER_AUTHORIZATION_KEY = "Authorization";
    /**
     * cookie key
     */
    public static final String COOKIE_TOKEN_KEY = "token";
    /**
     * TOKEN过期时间 单位秒
     */
    public static final Integer ACCESS_TOKEN_VALIDITY_SECONDS = 10 * 60;
    /**
     * REFRESH_TOKEN过期时间 单位秒
     */
    public static final Integer REFRESH_TOKEN_VALIDITY_SECONDS = 60 * 60;
    /**
     * password授权模式
     */
    public static final String GRANT_TYPE_PASSWORD = "password";
    /**
     * refresh_token授权模式
     */
    public static final String GRANT_TYPE_REFRESH_TOKEN = "refresh_token";
    /**
     * client_id
     */
    public static final String CLIENT_ID = "read-only-client";
    /**
     * client_secret
     */
    public static final String CLIENT_SECRET = "123456";
    /**
     * 获取token链接
     */
    public static final String OAUTH_TOKEN_URL = "http://localhost:9000/oauth/token";
    /**
     * BEARER_TYPE
     */
    public static final String BEARER_TYPE = "Bearer";
}
